package com.ksyun.seckill.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.ksyun.seckill.dto.CampaignItemDto;
import com.ksyun.seckill.entity.Campaign;
import com.ksyun.seckill.rest.RestResult;
import com.ksyun.seckill.vo.CampaignBasisInfoVO;
import com.ksyun.seckill.vo.CreateCampaignVO;
import com.ksyun.seckill.vo.SimpleCampaignVO;

import java.util.List;

/**
 * 自定义的活动接口服务
 */
public interface CampaignService extends IService<Campaign> {



    //-------------------------管理端 -------------------------
    /**
     * 查询活动列表
     */
    List<CampaignItemDto> selectCampaignList();


    /**
     * 创建活动
     * @param createCampaignVO
     */
    boolean saveCampaign(CreateCampaignVO createCampaignVO);

    /**
     * 上线某个活动
     * @param campaignId
     * @return
     */
    RestResult onlineCampaign(Long campaignId);

    /**
     * 下线某个活动
     * @param campaignId
     * @return
     */
    RestResult offlineCampaign(Long campaignId);


    /**
     * 删除某个活动
     * @param campaignId
     * @return
     */
    RestResult deleteCampaign(Long campaignId);





    //-------------------------- 用户端 -------------------------

    /**
     * 查询活动列表
     * @return
     */
    List<CampaignBasisInfoVO> selectSeckCampaignList();


    /**
     * 查询某个活动详情
     * @param campaignId
     * @return
     */
    SimpleCampaignVO getSimpleCampaignInfo(String campaignId);

}
